Efficient Path Planning And Collision Avoidance For Robotic Arms